<?php

namespace app\admin\model\outhouse;

use think\Model;
use traits\model\SoftDelete;

class TpdjList extends Model
{

    use SoftDelete;
    // 表名
    protected $name = 'tpdj_list';

    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    protected $deleteTime = 'deletetime';

    protected $type = [
        'store_quantity' => 'quantity',
        'tp_iQuantity' => 'quantity'
    ];

    public function tpdj()
    {
        return $this->hasOne('\app\admin\model\outhouse\Tpdj', 'code', 'code');
    }
    public function shelves(){
        return $this->hasOne('\app\common\model\Shelves','id','shelves_id')->field('id,name');
    }
    public function changeShelves(){
        return $this->hasOne('\app\common\model\Shelves','id','shelves_change_id')->field('id,name');
    }




}
